package org.haq.bae.ui.comp;

import com.vaadin.ui.Button;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.CustomComponent;

/**
 * AbstractToolbar
 * User: INDOCYBER
 * Date: 4/27/12
 * Time: 8:46 PM
 * Description:
 */
public abstract class AbstractToolbar extends CustomComponent {
    private final CssLayout cssLayout = new CssLayout();

    public AbstractToolbar() {
        cssLayout.setWidth("100%");
        cssLayout.setStyleName("toolbar");
        setCompositionRoot(cssLayout);
    }

    public void addButton(Button b){
        b.setStyleName("small");
        cssLayout.addComponent(b);
    }
}
